using System;

namespace Joy.Erp.Ufida.Pmc
{
    /// <summary>
    /// 供应/需求记录DTO
    /// </summary>
    public class SupplyDemandRecordDto
    {
        /// <summary>
        /// 记录类型：Supply-供应，Demand-需求
        /// </summary>
        public SupplyDemandType Type { get; set; }

        /// <summary>
        /// 单据号
        /// </summary>
        public string DocNo { get; set; }

        /// <summary>
        /// 单据类型
        /// </summary>
        public string DocType { get; set; }

        /// <summary>
        /// 单据类型名称
        /// </summary>
        public string DocTypeName { get; set; }

        /// <summary>
        /// 料号
        /// </summary>
        public string ItemCode { get; set; }

        /// <summary>
        /// 料品名称
        /// </summary>
        public string ItemName { get; set; }

        /// <summary>
        /// 料品规格
        /// </summary>
        public string ItemSpec { get; set; }

        /// <summary>
        /// 业务日期
        /// </summary>
        public string BusinessDate { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        public decimal Quantity { get; set; }

        /// <summary>
        /// 已完成数量
        /// </summary>
        public decimal CompletedQuantity { get; set; }

        /// <summary>
        /// 未完成数量
        /// </summary>
        public decimal PendingQuantity { get; set; }

        /// <summary>
        /// 单据状态
        /// </summary>
        public string Status { get; set; }

        /// <summary>
        /// 关联番号
        /// </summary>
        public string Seiban { get; set; }

        /// <summary>
        /// 需求编号（来自生产订单）
        /// </summary>
        public string DemandCode { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }

        /// <summary>
        /// 来源ID（生产订单、采购订单等的ID）
        /// </summary>
        public Guid? SourceId { get; set; }

        /// <summary>
        /// 来源行ID
        /// </summary>
        public Guid? SourceLineId { get; set; }
    }

    /// <summary>
    /// 供需类型
    /// </summary>
    public enum SupplyDemandType
    {
        /// <summary>
        /// 需求
        /// </summary>
        Demand = 0,

        /// <summary>
        /// 供应
        /// </summary>
        Supply = 1
    }
}

